// Copyright (c) 2025 Huawei Technologies Co., Ltd.
// openUBMC is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
//         http://license.coscl.org.cn/MulanPSL2
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
// See the Mulan PSL v2 for more details.
//
// Description: 封装不同类型的数据报文

#ifndef PACK_DATA_HPP
#define PACK_DATA_HPP

#include <vector>
#include <string>
#include "KVMMessage.hpp"
#include "VMMMessage.hpp"
#include "Defines.hpp"

class PackData {
private:
    KVMMessage kvmMsg_;
    VMMMessage vmmMsg_;

public:
    PackData();
    ~PackData();

    std::vector<uint8_t> ConnectKvm(const std::string& token);
    std::vector<uint8_t> DisconnectKvm();
    std::vector<uint8_t> KvmHeartBeat();
    std::vector<uint8_t> GetBootOption();
    std::vector<uint8_t> SetBootOption(std::vector<uint8_t> body);
    std::vector<uint8_t> PowerControl(std::vector<uint8_t> body);
    std::vector<uint8_t> GetVmmStatus();
    std::vector<uint8_t> GetVmmPort();
    std::vector<uint8_t> ConnectVmm(const std::string& token);
    std::vector<uint8_t> DisconnectVmm();
    std::vector<uint8_t> VmmHeartBeat();
    std::vector<uint8_t> CreateDevice(uint8_t deviceType);
    std::vector<uint8_t> CloseDevice(uint8_t deviceType);
    std::vector<uint8_t> SffOperationEnd(uint8_t result, uint8_t id);
    std::vector<uint8_t> SffDataPack(uint8_t dataType, uint8_t state, uint32_t dataLength, uint8_t seq);
};

#endif // PACK_DATA_HPP